1. Field of the Invention
The present invention relates to a moving picture encoding and decoding method, and in particular, relates to a moving picture encoding/decoding program, method, and device in which filter coefficients are adaptively switched to encode the interpolation of decimal-point picture elements used in motion compensation.
2. Description of the Related Art
In digital broadcast systems or services, a large number of moving picture signals are compressed and encoded for transmission and storage.
FIG. 1 is a block diagram showing the configuration of a typical encoding device for moving picture signals. The encoding device that is shown in FIG. 1 includes a local decoder and is made up of: frequency converter 11, quantizer 12, variable-length encoder 13, reverse quantizer 14, reverse frequency converter 15, frame memory 16, motion compensator 17, and motion vector detector 18.
An input image is applied as input to the encoder and divided into a plurality of blocks. When an input image is subjected to interframe prediction, the prediction values, which are generated from previously decoded images, are subtracted in each of the blocks by motion compensator 17. Interframe prediction is a method of using a previously reconstructed reference image to encode a current image.
These image blocks are next converted to frequency regions by frequency converter 11. The image blocks that have been converted to frequency regions are next quantized by quantizer 12. The image blocks that have been quantized are finally subjected to entropy encoding by variable-length encoder 13 and then stored.
As the local decoding, the above-described quantized image blocks are again returned to the original space regions by reverse quantizer 14 and reverse frequency converter 15.
In the case of interframe prediction, the above-described prediction values are added to image blocks to form a reconstructed image. This reconstructed image is used in encoding the next image and is therefore called a reference image. The above-described reference image is stored in frame memory 16 and used in motion vector detector 18 and motion compensator 17. Motion vector detector 18 detects motion vectors from the blocks of the input image and the above-described reference image. Motion compensator 17 generates prediction values from the above-described motion vectors and the above-described reference image.
FIG. 2 is a block diagram showing the configuration of the decoder that corresponds to the encoder shown in FIG. 1. The decoder that is shown in FIG. 2 is made up of: variable-length decoder 19, reverse quantizer 20, reverse frequency converter 21, motion compensator 22, and frame memory 23. The operations of reverse quantizer 20, reverse frequency converter 21, motion compensator 22, and frame memory 23 are the same as the operations of reverse quantizer 14, reverse frequency converter 15, motion compensator 17 and frame memory 16 in the encoder.
In decoding, the input is first restored from the encoded representation to the original representation by means of variable-length decoder 19. Reverse quantization and reverse frequency conversion are next performed on the decoded conversion coefficients to restore the conversion coefficients to space region image blocks. When performing interframe prediction, the prediction values are added to the image blocks that have been restored to space regions to form a reconstructed image. These prediction values are generated by means of the reference image that has been stored in frame memory 23 and motion vectors that are supplied from variable-length decoder 19. A reconstructed image is used in the image that is next to be decoded, and is therefore stored in frame memory 23.
Means for improving the efficiency of encoding the above-described moving picture signal include the use of a prefilter or motion compensation of decimal point picture element accuracy. A prefilter improves the encoding efficiency by using a filter to manipulate the bandwidth of the input image. In contrast, motion compensation of decimal point picture element accuracy improves the encoding efficiency by producing motion of decimal point accuracy in the reference image.
A prefilter limits the bandwidth of the input image, and therefore does not directly improve the encoding efficiency of a motion picture. Motion compensation of decimal point picture element accuracy in the prior art uses fixed filters to interpolate decimal point picture elements. As a consequence, the methods of the prior art are incapable of decimal point picture element interpolation that accords with bit rate and the nature of the moving picture.